Fixed: Resolving memory clashes when using shared mixed grid#289
Closed
kmokstad wants to merge 2 commits intoOPM:masterfrom
Closed
Fixed: Resolving memory clashes when using shared mixed grid#289kmokstad wants to merge 2 commits intoOPM:masterfrom
kmokstad wants to merge 2 commits intoOPM:masterfrom
Conversation
akva2
reviewed
Sep 7, 2018
| projBasis = m_basis.front(); | ||
| delete surf; | ||
| } | ||
| delete surf; |
Member
There was a problem hiding this comment.
without the delete here, we leak, surf is reassigned to a clone below.
Contributor
Author
There was a problem hiding this comment.
When the grid is shared, you can't delete surf, because then the object pointed to already has been deleted by the owner patch, that's why valgrind give you a message on this line, I think. It is still being deleted when the grid is not shared, that's why its is moved inside the if (m_basis.empty()) block. But it can be the fix has to be different. I only noticed that valgrind stopped complaining about it (did not check for leakage).
f5e1b76 to
a2a1e1a
Compare
Changed: Made the 2D and 3D mixed implementations equivalent. There were some discrepancies here and there which I think were not intended, but a result of doing non-tested things at different times.
DOFs to constrain for all bases (when invoked with basis=0)
Contributor
Author
|
The last commit is now in #397. The rest is obsolete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this changes the used of shared mixed grids works without crashing or valgrind issues at least.
Needs to be checked further (and also for 3D).